<template>
  <!-- 热门推荐列表-->
  <div>
    <ul class="flexWap padding15 borderB1">
    
      <li class="wid250px marginB10 marginR10">
        <el-input placeholder="请输入搜索的内容" @change="search" v-model="pages.keyWord" :clearable="true">
        </el-input>
      </li>
      <li class="marginB10 marginR10">
        
        <el-button type="primary" @click="search">查询</el-button>
      </li>
      <li class="marginB10 marginR10">
        
        <el-button type="primary" @click="addHot">新增</el-button>
      </li>
      <li class="marginB10 marginR10">
        <el-button type="danger">批量删除</el-button>
      </li>
    </ul>
      
    <div class="padding15">
        <p class="paddingB15">已选择 <span class="colorRed">{{multipleSelection.length}}</span> 条数据</p>
      <el-table
              :data="lists"
              height="580"
              stripe
              border
              ref="multipleTable"
              @selection-change="handleSelectionChange"
              style="width: 100%">
              <el-table-column type="selection" width="55"/>
              <el-table-column align="center" type="index" label="序号" width="50" />
      
        <el-table-column align="center" prop="organizationName" label="资讯标题" min-width="160"/>
        <el-table-column  align="center" prop="title" label="排序" width="120" />
        <el-table-column  align="center" prop="qCategoryNames" label="热榜时间" width="120" />
        <el-table-column  align="center" prop="qCategoryNames" label="阅读量" width="120" />
        <el-table-column label="操作" align="center" width="140" fixed="right">
          <template slot-scope="scope">
              <el-button size="mini"  type="danger" @click="handleDelete(scope.row)">删除</el-button>
          </template>
        </el-table-column>
      </el-table>
      <Pagination :total="total" :pages="pages" :searchQuery="searchQuery"></Pagination>
    </div>
    <el-drawer
        append-to-body
        title="选择资讯"
        :visible.sync="hotShow"
        size="80%"
        @close="close"
    >
     <RealTimeInfoList  isPage="no" v-if="hotShow" @close="close" @submit="submit" />
    </el-drawer>
  </div>
</template>
<script>
  // import {questionnaireRecordReportList,questionnaireRecordDel} from '@/assets/api/api'
  import {Mixin} from '@/assets/mixins/mixin'
  import moment from 'moment'
  import RealTimeInfoList from './realTimeInfoList'
  export default {
    name:'HotList',
    mixins: [Mixin],
    components:{
      RealTimeInfoList
    },
    data(){
      return{
        addEditPath:'',//新增编辑的路径
        pageLoading:false,
        multipleSelection:[],
        hotShow:false,//选择显示
        pages:{ //分页搜索
          keyWord:'',
          page:1,
          size:10,
        },
        total:0,// 总条数
        loading:false,//加载中...
        lists:[{id:1}],
        detailObj:{},//点击每行的详情数据
        
      }
    },
    created() {
       
    },
    methods:{
      addHot(){
          this.hotShow = true;
      },
      submit(){
          this.hotShow = false;
      },
      close(){
         this.hotShow = false;
      },
      handleSelectionChange(val) {//多选
        this.multipleSelection = val;
      },
     
  
    }
  }
</script>
<style lang="scss" scoped>
::v-deep .el-input-group__append, ::v-deep.el-input-group__prepend{
    color: #fff;
  }

</style>
